/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#ifndef GR_BARY_H
#define GR_BARY_H

#include "gr_graph.h"
#include "gr_node.h"
#include "gr_edge.h"

#include "gr_graph_fun.h"
int 
compute_bary_positions(GraphFrame *gf, int cycle_len);
void 
find_cycle(GraphFrame *gf, struct pt *v, int level, int cycle_len);
void
save_new_cycle(GraphFrame *gf,struct pt *begin, struct pt *end, int cycle_len);
void
reset_mark_vertices(GraphFrame *gf);
void
reset_mark_pick_vertices(GraphFrame *gf);
void
reset_level_vertices(GraphFrame *gf);

void
get_cycle(GraphFrame *gf, int cycle_len);

int
circularize(GraphFrame *gf, LNode_type *the_cycle, int node_cnt);
int
calculate_window_size(GraphFrame *gf, Dimension *X, Dimension *Y);
void 
get_rest(GraphFrame *gf);
int
layout_rest(GraphFrame *gf, LNode_type *the_rest, int rest_cnt);
void
solve_gauss_jordan(double **M, int n, int m);

void
get_sel_cycle(GraphFrame *gf);

int 
compute_sel_bary_positions(GraphFrame *gf);

#endif
